.subtitle-display {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.no-subtitles {
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.no-subtitles p {
  margin: 10px 0;
}

.no-subtitles .hint {
  font-size: 14px;
  color: #999;
}

.subtitle-help {
  background: #f8f9fa;
  padding: 10px 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.help-text p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.subtitle-controls {
  display: flex;
  gap: 8px;
}

.auto-scroll-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
}

.auto-scroll-btn.active {
  background: #28a745;
}

.auto-scroll-btn:hover {
  transform: scale(1.05);
}

.auto-scroll-btn.active:hover {
  background: #1e7e34;
}

.auto-scroll-btn:not(.active):hover {
  background: #545b62;
}

.translation-btn {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
}

.translation-btn.active {
  background: #138496;
}

.translation-btn:hover {
  transform: scale(1.05);
}

.translation-btn.active:hover {
  background: #0f6674;
}

.translation-btn:not(.active):hover {
  background: #117a8b;
}

.subtitle-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  max-height: calc(100vh - 300px);
}

.subtitle-item {
  padding: 15px 20px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.subtitle-item:hover {
  background: #f8f9fa;
}

.subtitle-item.active {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.subtitle-item:last-child {
  border-bottom: none;
}

.subtitle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.subtitle-time {
  font-size: 12px;
  color: #666;
  font-family: 'Courier New', monospace;
}

.subtitle-actions {
  display: flex;
  gap: 4px;
}

.analyze-btn {
  background: #6f42c1;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  transform: scale(0.8);
}

.subtitle-item:hover .analyze-btn {
  opacity: 1;
  transform: scale(1);
}

.analyze-btn:hover:not(:disabled) {
  background: #563d7c;
}

.analyze-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.subtitle-text {
  font-size: 16px;
  line-height: 1.5;
  color: #333;
}

.subtitle-item.active .subtitle-text {
  font-weight: 500;
  color: #1976d2;
}

.subtitle-translation {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-left: 3px solid #17a2b8;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  color: #495057;
  line-height: 1.4;
}

.subtitle-item.active .subtitle-translation {
  background: #e1f5fe;
  border-left-color: #0288d1;
}

/* 滚动条样式 */
.subtitle-list::-webkit-scrollbar {
  width: 6px;
}

.subtitle-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.subtitle-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.subtitle-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 浮动的回到当前位置按钮 */
.go-to-current-btn {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: #007bff;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  animation: pulse 2s infinite;
}

.go-to-current-btn:hover {
  background: #0056b3;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

@keyframes pulse {
  0% { box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); }
  50% { box-shadow: 0 4px 12px rgba(0, 123, 255, 0.6); }
  100% { box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); }
}

/* 滚动状态提示 */
.scroll-status {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 999;
  animation: fadeInOut 0.3s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.subtitle-display {
  position: relative;
}

@media (max-width: 768px) {
  .subtitle-help {
    padding: 8px 15px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  
  .help-text p {
    font-size: 12px;
  }

  .subtitle-controls {
    align-self: flex-end;
  }

  .auto-scroll-btn {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
    padding: 5px 7px;
  }

  .translation-btn {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
    padding: 5px 7px;
  }

  .go-to-current-btn {
    width: 45px;
    height: 45px;
    right: 15px;
    font-size: 16px;
  }

  .scroll-status {
    bottom: 15px;
    font-size: 11px;
    padding: 6px 12px;
  }

  .subtitle-item {
    padding: 12px 15px;
  }

  .analyze-btn {
    opacity: 1;
    transform: scale(1);
    font-size: 11px;
    padding: 1px 4px;
  }

  .subtitle-translation {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .subtitle-time {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .subtitle-text {
    font-size: 14px;
    line-height: 1.4;
  }

  .subtitle-list {
    max-height: calc(100vh - 250px);
  }
}

@media (max-width: 480px) {
  .subtitle-help {
    padding: 6px 12px;
  }

  .help-text p {
    font-size: 11px;
  }

  .auto-scroll-btn {
    min-width: 26px;
    height: 26px;
    font-size: 12px;
    padding: 4px 6px;
  }

  .translation-btn {
    min-width: 26px;
    height: 26px;
    font-size: 12px;
    padding: 4px 6px;
  }

  .subtitle-item {
    padding: 10px 12px;
  }

  .subtitle-text {
    font-size: 13px;
  }

  .go-to-current-btn {
    width: 40px;
    height: 40px;
    right: 12px;
    font-size: 14px;
  }

  .scroll-status {
    bottom: 12px;
    font-size: 10px;
    padding: 5px 10px;
  }
}

/* 针对超小屏幕优化 */
@media (max-width: 360px) {
  .subtitle-help {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .help-text p {
    font-size: 10px;
    flex: 1;
  }

  .go-to-current-btn {
    width: 36px;
    height: 36px;
    right: 10px;
    font-size: 13px;
  }
}